link by attribute

Hi,
I want to create links via an attribute.

On my attribute I have such kind of a value:

MFD-123
VUHF-456
MFD-456

For that kind of a value, I want to select MFD module and need my code to only create links for each MFD- like entries.

First, I need to get the integer part of the MFD- (or whatever) and create links of that absolute number for the target module (in this cafe MFD)

Can you help me with that?
ozguraltay - Mon Mar 05 09:28:49 EST 2012

Re: link by attribute
llandale - Tue Mar 06 18:59:12 EST 2012

If you have made sure that the Module Prefixes in your project are unique (i.e. one module with prefix "MFD-") then you can do this.
  • Either make a table associating Prefixes with Modules, or look at all the module properties of all modules in your project and get their prefixes.
  • Parse your attribute value getting each separate desired link Object ID.
  • Separate the ID into its Prefix part and the AbsNo part
  • Find and open the target module
  • Get a Handle of the object with that absno
  • Create the link

-Louie